import request from "@/util/request";
import {post} from "axios";

export default {
    // 1. 查询
    findAllStaffs(){
        return request({
            url:"/teacher/list",
            method:"get"
        })
    },
    // 2. 分页查询
    findByPage(page,pageSize){
        return request({
            url:`/staff/findByPage/${page}/${pageSize}`,
            method:"get"
        })
    },
    // 3. 条件查询带分页
    search(page,pageSize,data){
        return request({
            url:`/teacher/search/${page}/${pageSize}`,
            method:"post",
            data
        })
    },
    // 4. 保存员工
    save(url,method,data){
        return request({
            url,
            method,
            data
        })
    },
    // 5. 删除员工
    deleteStaff(ids){
        return request({
            url:`/teacher/delete/${ids}`,
            method:"delete"
        })
    },
}
